﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Website/Views/Shared/Product.Master"Inherits="System.Web.Mvc.ViewPage<OrderViewModel>" %>
    <%@ Import Namespace="xTeam.Hengle.Helper" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <div class="lc">
        <table class="v1">
            <thead>
                <tr class="title">
                    <td colspan="6">
                        订单信息
                    </td>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td class="textRight width80">
                        编号:
                    </td>
                    <td>
                        <%= Model.OrderView.OrderId %>
                    </td>
                    <td class="textRight width80">
                        总件数:
                    </td>
                    <td>
                        <%= Model.OrderView.Count %>
                    </td>
                    <td class="textRight width80">
                        总金额
                    </td>
                    <td class="colorRed fontBold">
                        <%= Model.OrderView.Price.ToString("0.00") %>
                    </td>
                </tr>
                <tr>
                    <td class="textRight">
                        备注:
                    </td>
                    <td colspan="5">
                        <%= Model.OrderView.Description %>
                    </td>
                </tr>
                <tr>
                    <td class="textRight">
                        支付状态:
                    </td>
                    <td>
                    <%= StringExtendFun.OrderState(Model.OrderView.State)%>
                    &nbsp;&nbsp;
                    <%= StringExtendFun.PayLink(Url,Model.OrderView.State,Model.OrderView.OrderId)%>
                    </td>
                    <td colspan="4"></td>
                </tr>
                <tr>
                    <td class="textRight">
                        生成日期:
                    </td>
                    <td>
                        <%= Model.OrderView.AddDate %>
                    </td>
                    <td>
                    </td>
                    <td>
                    </td>
                    <td>
                    </td>
                    <td class="width100">
                        <%= string.Format("<div class='orderState orderState_{0}'></div>",Model.OrderView.State) %>
                    </td>
                </tr>
            </tbody>
        </table>
        <br />
        <table class="v2">
            <thead>
                <tr class="title" style="text-align: center;">
                    <td class="textLeft">
                        商品名称
                    </td>
                    <td>
                        数量
                    </td>
                    <td>
                        零售价
                    </td>
                    <td>
                        折扣率
                    </td>
                    <td>
                        折扣价
                    </td>
                    <td>
                        合计
                    </td>
                </tr>
            </thead>
            <tbody class="textCenter">
                <% foreach (var item in Model.ProductList) {
                %>
                <tr>
                    <td class="textLeft">
                        <%=Html.ActionLink(item.ProductName, "PreView", "Product", new { ProductId = item.ProductId }, new { target="_blank"})%>
                        <span class="font12 colorGray">
                            <%= item.Description.Replace("\n","&nbsp;") %></span>
                    </td>
                    <td>
                        <%= item.SalesCount %>
                    </td>
                    <td>
                        <%= item.Price %>
                    </td>
                    <td>
                        <%= item.DisCount.ToString("0.00") %>
                    </td>
                    <td>
                        <%= ((decimal)item.DisCount * item.Price).ToString("0.00") %>
                    </td>
                    <td>
                        <%= (item.SalesCount * (decimal)item.DisCount * item.Price).ToString("0.00") %>
                    </td>
                </tr>
                <%   
                   } 
                %>
            </tbody>
        </table>
        <br />
        <table class="v3">
            <thead>
                <tr class="title">
                    <td colspan="2">
                        收货人信息
                    </td>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td class="width80 textRight">
                        姓名:
                    </td>
                    <td>
                        <%= Model.Address.ReallyName %>
                    </td>
                </tr>
                <tr>
                    <td class="textRight">
                        地址:
                    </td>
                    <td>
                        <%= Model.Address.Address %>
                    </td>
                </tr>
                <tr>
                    <td class="textRight">
                        邮编:
                    </td>
                    <td>
                        <%= Model.Address.PostNo %>
                    </td>
                </tr>
                <tr>
                    <td class="textRight">
                        电话:
                    </td>
                    <td>
                        <%= Model.Address.Phone %>
                    </td>
                </tr>
                <tr>
                    <td class="textRight">
                        手机:
                    </td>
                    <td>
                        <%= Model.Address.Mobile %>
                    </td>
                </tr>
                <tr>
                    <td class="textRight">
                        备注:
                    </td>
                    <td>
                        <%= Model.Address.Description %>
                    </td>
                </tr>
            </tbody>
        </table>
        <br />
        <table class="v4">
            <thead>
                <tr class="title">
                    <td colspan="2">
                        物流信息
                    </td>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td class="width80 textRight">
                        快递编号:
                    </td>
                    <td>
                        <%= Model.Express.ExpressNo %>
                    </td>
                </tr>
                <tr>
                    <td class="textRight">
                        发货说明:
                    </td>
                    <td>
                        <%= Model.Express.Description %>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
    <br />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cssLink" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="jsLink" runat="server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="cssContent" runat="server">
    <style type="text/css">
        .lc
        {
            margin: auto;
        }
        .lc table
        {
            border-collapse: collapse;
            background-color: #fff;
            border: solid 1px #A2CBFF;
            border-bottom-width: 0px;
            width: 100%;
        }
        .lc table td
        {
            overflow: hidden;
            padding: 5px;
            vertical-align: middle;
            border-bottom: solid 1px #A2CBFF;
            line-height: 1.5em;
        }
        .lc table tr.title
        {
            background-color: #C6D9F0;
        }
    </style>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="jsContent" runat="server">
</asp:Content>
